home *** CD-ROM | disk | FTP | other *** search
/ Armageddon - Interactive Preview / Interactive Preview: Armageddon.iso / pc / arm_game.dxr / Internal_3_aShuttleObj.ls < prev    next >
Encoding:
Text File  |  1998-05-15  |  1.1 KB  |  41 lines

  1. property pShuttleSprite, pMouseH, pMouseV, pLeftShuttle, pRightShuttle
  2.  
  3. on new me, thisSprite
  4.   set pShuttleSprite to thisSprite
  5.   puppetSprite(pShuttleSprite, 1)
  6.   set pLeftShuttle to the memberNum of sprite pShuttleSprite - 1
  7.   set pRightShuttle to the memberNum of sprite pShuttleSprite + 1
  8.   return me
  9. end
  10.  
  11. on mMoveShuttle me
  12.   set x1 to the locH of sprite pShuttleSprite
  13.   if x1 > the mouseH then
  14.     set the memberNum of sprite pShuttleSprite to pLeftShuttle + 1
  15.     updateStage()
  16.     set the memberNum of sprite pShuttleSprite to pLeftShuttle
  17.     updateStage()
  18.   end if
  19.   if x1 < the mouseH then
  20.     set the memberNum of sprite pShuttleSprite to pLeftShuttle + 1
  21.     updateStage()
  22.     set the memberNum of sprite pShuttleSprite to pRightShuttle
  23.     updateStage()
  24.   end if
  25.   if x1 = the mouseH then
  26.     set the memberNum of sprite pShuttleSprite to pLeftShuttle + 1
  27.     updateStage()
  28.   end if
  29.   set the locH of sprite pShuttleSprite to the mouseH
  30.   if the mouseH < 20 then
  31.     set the locH of sprite pShuttleSprite to 20
  32.   end if
  33.   if the mouseH > 620 then
  34.     set the locH of sprite pShuttleSprite to 620
  35.   end if
  36. end
  37.  
  38. on mGetSprite me
  39.   return pShuttleSprite
  40. end
  41.